Package-level declarations

Entrypoint for the Sync API: synchronizes local FHIR resources with a remote FHIR server/store.

Types

Link copied to clipboard
data class BackoffCriteria(val backoffPolicy: BackoffPolicy, val backoffDelay: Long, val timeUnit: TimeUnit)
Link copied to clipboard

Contains the result of the conflict resolution. For now, Resolved is the only acceptable result and the expectation is that the client will resolve each and every conflict in-flight that may arise during the sync process. There is no way for the client application to abort or defer the conflict resolution to a later time.

Link copied to clipboard
fun interface ConflictResolver

Resolves conflicts between the client and remote changes in a Resource.

Link copied to clipboard

Sealed class representing different states of a synchronization operation. It combines WorkInfo.State and SyncJobStatus. Enqueued state represents WorkInfo.State.ENQUEUED where SyncJobStatus is not applicable. Running state is a combined state of WorkInfo.State.ENQUEUED and SyncJobStatus.Started or SyncJobStatus.InProgress. Succeeded state is a combined state of WorkInfo.State.SUCCEEDED and SyncJobStatus.Started or SyncJobStatus.Succeeded. Failed state is a combined state of WorkInfo.State.FAILED and SyncJobStatus.Failed. Cancelled state represents WorkInfo.State.CANCELLED where SyncJobStatus is not applicable.

Link copied to clipboard

Manages the process of downloading FHIR resources from a remote server.

Link copied to clipboard
abstract class FhirSyncWorker(appContext: Context, workerParams: WorkerParameters) : CoroutineWorker

Handles FHIR data synchronization between local database and remote server.

Link copied to clipboard
sealed interface HttpAuthenticationMethod

The HTTP authentication method to be used for generating HTTP authorization header.

Link copied to clipboard
fun interface HttpAuthenticator

Provides an authorization method for the HTTP requests FHIR Engine sends to the FHIR server.

Link copied to clipboard
sealed class LastSyncJobStatus

Sealed class representing the result of a synchronization operation. These are terminal states of the sync operation, representing Succeeded and Failed.

Link copied to clipboard
typealias ParamMap = Map<String, String>

Class that holds what type of resources we need to synchronise and what are the parameters of that type. e.g. we only want to synchronise patients that live in United States ResourceSyncParams(ResourceType.Patient, mapOf("address-country" to "United States")

Link copied to clipboard
class PeriodicSyncConfiguration(val syncConstraints: Constraints = Constraints.Builder().build(), val repeat: RepeatInterval, val retryConfiguration: RetryConfiguration? = defaultRetryConfiguration)

Configuration for period synchronisation

Link copied to clipboard
data class PeriodicSyncJobStatus(val lastSyncJobStatus: LastSyncJobStatus?, val currentSyncJobStatus: CurrentSyncJobStatus)

Data class representing the state of a periodic synchronization operation. It is a combined state of WorkInfo.State and SyncJobStatus. See CurrentSyncJobStatus and LastSyncJobStatus for more details.

Link copied to clipboard
data class RepeatInterval(val interval: Long, val timeUnit: TimeUnit)
Link copied to clipboard
data class Resolved(val resolved: Resource) : ConflictResolutionResult
Link copied to clipboard
data class ResourceSyncException(val resourceType: ResourceType, val exception: Exception)
Link copied to clipboard
data class RetryConfiguration(val backoffCriteria: BackoffCriteria, val maxRetries: Int)

Configuration for synchronization retry

Link copied to clipboard
object Sync
Link copied to clipboard
Link copied to clipboard
sealed class SyncJobStatus

Sealed class representing different states of a synchronization operation. These states do not represent WorkInfo.State, whereas CurrentSyncJobStatus combines WorkInfo.State and SyncJobStatus in one-time and periodic sync. For more details, see CurrentSyncJobStatus and PeriodicSyncJobStatus.

Link copied to clipboard

Properties

Link copied to clipboard

Accepts the local change and rejects the remote change.

Link copied to clipboard

Accepts the remote change and rejects the local change.

Functions

Link copied to clipboard